/**
 * Created by iallai on 2/1/2018.
 */

import axios from 'axios'
import {CONFIG} from '@/config/env'

let API = CONFIG.PROJECT.API;


const reg = (query = {}) => new Promise((resolve, reject) => {

  if (CONFIG.PROJECT.ROLE['username'] == "saleUser") {
    axios.get(`${API.URL}/admin_basics/user`, {
      params: query
    }).then(function (res) {
      if (API.isOK(res.data)) {
        resolve(res.data);
      }
    })

  }else{

    resolve({
      name: '猫图科技'
    });
  }


});


export {reg}

